import { Link } from '@brillout/docpress'
import { ConfigSpec } from '../../components'

<ConfigSpec
  env="Vite (development & build-time)"
  global
  isTypeOneLiner
>
`boolean | string {:ts}`
</ConfigSpec>

Vike's `+host` setting is just an alias for [Vite's CLI `--host` option](https://vite.dev/guide/cli.html#options) (which sets Vite's [server.host](https://vite.dev/config/server-options.html#server-host) and [preview.host](https://vite.dev/config/preview-options.html#preview-host) configuration).

This:

```ts
// +config.ts

import type { Config } from 'vike/types'

export default {
  host: true
} satisfies Config
```

Is equivalent to that:

```ts
// vite.config.ts

import type { Config } from 'vike/types'

export default {
  server: {
    host: true
  },
  preview: {
    host: true
  }
} satisfies Config
```

If you want to set two different values between development and preview, then set the values over `vite.config.js` instead of using `+host`.


## See also

- <Link href="/settings" />
